#ifndef SIMPLE_APP_H
#define SIMPLE_APP_H

#include "include/cef_app.h"

class SimpleApp : public CefApp,
        public CefBrowserProcessHandler,
        public CefRenderProcessHandler
{
public:
    SimpleApp();
    ~SimpleApp();

    // CefApp methods:
    virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() OVERRIDE {
        return this;
    }
    virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() OVERRIDE {
        return this;
    }

    // CefBrowserProcessHandler methods:
    virtual void OnContextInitialized() OVERRIDE;

    // CefRenderProcessHandler methods:
    virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
                                  CefRefPtr<CefFrame> frame,
                                  CefRefPtr<CefV8Context> context) OVERRIDE;

private:
    IMPLEMENT_REFCOUNTING(SimpleApp);
};

#endif // SIMPLE_APP_H
